//
//  CountryListTableViewCell.m
//  TravelWorld
//
//  Created by dllo on 15/5/22.
//  Copyright (c) 2015年 lanou. All rights reserved.
//

#import "CountryListTableViewCell.h"
@interface CountryListTableViewCell ()
@property(nonatomic, retain) UIImageView *imageBG;
@property(nonatomic, retain) UILabel *cnLabel;
@property(nonatomic, retain) UILabel *enLabel;
@end
@implementation CountryListTableViewCell
-(void)dealloc{
    [_imageBG release];
    [_cnLabel release];
    [_enLabel release];
    [super dealloc];
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self creatCell];
    }
    return self;
}

- (void)creatCell{
    self.imageBG = [[UIImageView alloc] init];
    self.cnLabel = [[UILabel alloc] init];
    self.enLabel = [[UILabel alloc] init];
    
    [self.contentView addSubview:self.imageBG];
    [self.contentView addSubview:self.cnLabel];
    [self.contentView addSubview:self.enLabel];
    
    [_imageBG release];
    [_cnLabel release];
    [_enLabel release];
}

- (void)layoutSubviews{
    [super layoutSubviews];
    self.imageBG.frame = CGRectMake(0, 0, self.frame.size.width, 140);
//    self.imageBG.backgroundColor = [UIColor darkGrayColor];
    self.imageBG.image = [UIImage imageNamed:@"pic.jpg"];
    
    self.cnLabel.frame = CGRectMake(20, self.frame.size.height - 50, self.frame.size.width, 30);
    self.cnLabel.textColor = [UIColor whiteColor];
    self.cnLabel.text = [NSString stringWithFormat:@"%@ (%@)", @"泰国", @"Thailand"];
//    self.cnLabel.backgroundColor = [UIColor darkGrayColor];
    
//    self.enLabel.frame = CGRectMake(130, self.frame.size.height - 50, 100, 30);
//    self.enLabel.textColor = [UIColor whiteColor];
//    self.enLabel.text = [NSString stringWithFormat:@"(%@)", @"Thailand"];
//    self.enLabel.backgroundColor = [UIColor darkGrayColor];
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
